<? echo $adminMenu->write(); ?>
<? include_once "_tiny_mce.php" ?>
<div class="article">
    <div id="preview" style="display: none;"></div>
    <? echo $form->create();?>
    <? echo $form->input('id'); ?>
    <fieldset><legend><? __('Edit article');?></legend>
          <ul>
            <li><? echo $form->input('title', array('label'=>__('Title',true),'div' => false)); ?></li>
            <li><? echo $form->input('seo_link', array('label'=>__('Seo link',true),'div' => false)); ?></li>
            <li><? echo $form->input('intro_text', array('style'=>'height:150px;','cols'=>'10','rows'=>'10','type'=>'textarea')); ?></li>
            <li><? echo $form->input('text', array('style'=>'height:300px;','cols' => '10','rows'=>'10','type'=>'textarea')); ?></li>
            <li>
                <div id="tabs">
                    <ul>
                        <li id="tabHeaderActive"><a href="javascript:void(0)"
                                                    onclick="toggleTab(1,3,1,false)"><span><? __('Advanced settings'); ?></span></a></li>
                        <li id="tabHeader2"><a href="javascript:void(0)"
                                               onclick="toggleTab(2,3,2,false)"><span><? __('Display of article'); ?></span></a></li>
                        <li id="tabHeader3"><a href="javascript:void(0)"
                                               onclick="toggleTab(3,3,3,false)"><span><? __('Tags') ?></span></a></li>
                    </ul>

                    <div id="tabscontent">
                        <div id="tabContent1" class="tabContent">
                            <ul>
                                <li><? echo $form->input('Article.category_id', array('label'=>__('Category',true),'div' => false)); ?></li>
                                <li><? echo $form->input('user_id', array('label'=>__('Author',true),'selected'=>(empty($_POST) ? $user['id'] : null),'div' => false)); ?></li>
                                <li><? echo $form->label('created',__('Date',true)); echo $form->dateTime('created','DMY',24); ?></li>
                                <li><? echo $form->input('priority', array('label'=>__('Priority',true),'div' => false,'value'=>(empty($_POST) ? 1 : null),'style'=>'width:50px')); ?></li>
                            </ul>
                        </div>

                        <div id="tabContent2" class="tabContent" style="display: none;">
                            <ul>
                                <li><? echo $form -> label('visible',__('Visible',true)); ?>
                                <? echo $form -> input('visible',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

                                <li><? echo $form -> label('show_author',__('Show author',true)); ?>
                                <? echo $form -> input('show_author',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

                                <li><? echo $form -> label('show_informations',__('Show information',true)); ?>
                                <? echo $form -> input('show_informations',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

                                <li><? echo $form -> label('show_all',__('Show whole article',true)); ?>
                                <? echo $form -> input('show_all',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? false : null))); ?></li>

                                <li><? echo $form -> label('show_on_index',__('Show on index page',true)); ?>
                                <? echo $form -> input('show_on_index',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>
                            </ul>
                        </div>

                        <div id="tabContent3" class="tabContent" style="display: none;">
                            <ul>
                                <li><? echo $form->input('Tag', array('style'=>'width: 50%','label'=>__('Tags',true),'div' => false)); ?></li>
                            </ul>
                        </div>
                    </div>
                    <!--End of tabscontent--></div>
                <!--End of tabs--></li>
        </ul>
    </fieldset>
    <div class="input_line">
        <div><? echo $articleMenu->create('ArticleEditForm'); ?></div>
    </div>
</form>
</div>
